import request from '@/utils/request'

// 查询分享链接列表
export function listLink(query) {
  return request({
    url: '/customer/link/list',
    method: 'get',
    params: query
  })
}

// 查询分享链接详细
export function getLink(shareLinkId) {
  return request({
    url: '/customer/link/' + shareLinkId,
    method: 'get'
  })
}

// 查询训练产品列表
export function listProduct(query) {
  return request({
    url: '/customer/product/list',
    method: 'get',
    params: query
  })
}

// 新增分享链接
export function addLink(data) {
  return request({
    url: '/customer/link',
    method: 'post',
    data: data
  })
}

// 修改分享链接
export function updateLink(data) {
  return request({
    url: '/customer/link',
    method: 'put',
    data: data
  })
}

// 删除分享链接
export function delLink(shareLinkId) {
  return request({
    url: '/customer/link/' + shareLinkId,
    method: 'delete'
  })
}
